package StudyCode.summary.mycollection;

/**
 * 版权所有 科技与人文(www.tah1986.com)
 */
public class ChecksIfTheIterableContainsSomethingOfAnInstanceClass {
	public static <T> boolean containsInstance(Iterable<T> iterable, Class c) {
		for (T t : iterable) {
			if (c.isInstance(t)) {
				return true;
			}
		}
		return false;
	}
}
